package datamanager;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

//import org.ini4j.Wini;

public class DataCollector {
	
	// Data collectors
	private String elasticStressFieldName;
	private int annihilated = 0;
	private int nucleated = 0;
	private boolean saveData;
	private double averageVelocity;
	private int mobile;
	private int dipole;
	private int total;
	private double density;
	public String getElasticStressFieldName() {
		return elasticStressFieldName;
	}
	public void setElasticStressFieldName(String elasticStressFieldName) {
		this.elasticStressFieldName = elasticStressFieldName;
	}
	public int getAnnihilated() {
		return annihilated;
	}
	public void setAnnihilated(int annihilated) {
		this.annihilated = annihilated;
	}
	public int getNucleated() {
		return nucleated;
	}
	public void setNucleated(int nucleated) {
		this.nucleated = nucleated;
	}
	public boolean isSaveData() {
		return saveData;
	}
	public void setSaveData(boolean saveData) {
		this.saveData = saveData;
	}
	public double getAverageVelocity() {
		return averageVelocity;
	}
	public void setAverageVelocity(double averageVelocity) {
		this.averageVelocity = averageVelocity;
	}
	public int getMobile() {
		return mobile;
	}
	public void setMobile(int mobile) {
		this.mobile = mobile;
	}
	public int getDipole() {
		return dipole;
	}
	public void setDipole(int dipole) {
		this.dipole = dipole;
	}
	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	public double getDensity() {
		return density;
	}
	public void setDensity(double density) {
		this.density = density;
	}
	
	public void saveData(String filename) throws IOException{
		BufferedWriter out = null;
		out = new BufferedWriter(new FileWriter(filename));
		out.close();
//		Wini dataFile = new Wini(new File(filename));
//		
//		dataFile.put("Final", "TotalDislocation", total);
//		dataFile.put("Final", "MobileDislocation", mobile);
//		dataFile.store();
	}
	

	public DataCollector(){
		
	}
}
